      SUBROUTINE SETUP
      RETURN
      END
C   HS106    10-1410
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX= X(1)+X(2)+X(3)
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      INTEGER J
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      DO      100      J=1,N
      IF(J .LE. 3)       GRADF(J)=1.D0
      IF(J .GT. 3)       GRADF(J)=0.D0
  100 CONTINUE
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),UG(8),OG(8),GXI
      SAVE UG,OG
      DATA UG/1.D2,2*1.D3,5*1.D1/
      DATA OG/3*1.D4,5*1.D3/
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1      
      IF(I .GT. 6)      GOTO 700
      GOTO (100,200,300,400,500,600),I
      RETURN
 100  CONTINUE
      GXI=1.D0-2.5D-3*(X(4)+X(6))
      RETURN
  200 CONTINUE
      GXI=1.D0-2.5D-3*(X(5)+X(7)-X(4) )
      RETURN
  300 CONTINUE
      GXI=1.D0-1.0D-2*(X(8)-X(5))
      RETURN
  400 CONTINUE
      GXI=(X(1)*X(6)-8.3333252D2*X(4)-1.D2*X(1)+8.3333333D4)*1.D-5
      RETURN
  500 CONTINUE
      GXI=(X(2)*(X(7)-X(4))+1.25D3*(X(4)-X(5)))*1.D-5
      RETURN
  600 CONTINUE
      GXI=(X(3)*(X(8)-X(5))+2.5D3*X(5)-1.25D6)  *1.D-5
      RETURN
  700 CONTINUE
      IF(I .LE. 14)      GXI=X(I- 6)-UG(I- 6)
      IF(I .GT. 14)      GXI=OG(I-14)-X(I-14)
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX),GRADGI(NX)
      IF ( GUNIT(1,I+NH) .EQ. 1 )RETURN
      CGRES(I+NH)=CGRES(I+NH)+1
      DO      100      J=1,8
      GRADGI(J)= 0.D0
 100  CONTINUE
      IF(I .GT. 6)      GOTO 800
      GOTO (200,300,400,500,600,700),I
 200  CONTINUE
      GRADGI(4)=-2.5D-3
      GRADGI(6)=-2.5D-3
      RETURN
  300 CONTINUE
      GRADGI(4)= 2.5D-3
      GRADGI(5)=-2.5D-3
      GRADGI(7)=-2.5D-3
      RETURN
  400 CONTINUE
      GRADGI(5)= 1.D-2
      GRADGI(8)=-1.D-2
      RETURN
  500 CONTINUE
       GRADGI(1)=(X(6)-1.D2)*1.D-5
       GRADGI(4)=-8.3333252D2*1.D-5
       GRADGI(6)=X(1) *1.D-5
      RETURN
  600 CONTINUE
      GRADGI(2)=(X(7)-X(4))*1.D-5
      GRADGI(4)=(1.25D3-X(2))*1.D-5
      GRADGI(5)=-1.25D3*1.D-5
      GRADGI(7)=X(2) *1.D-5
      RETURN
  700 CONTINUE
      GRADGI(3)=(X(8)-X(5))*1.D-5
      GRADGI(5)=(2.5D3-X(3))*1.D-5
      GRADGI(8)=X(3)*1.D-5
      RETURN
  800 CONTINUE
      IF(I .LE. 14)      GRADGI(I-6)=1.D0
      IF(I .GT. 14)      GRADGI(I-14)=-1.D0
      RETURN
      END
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS106'/
      DATA (X(I),I=1,8)
     F   /3*5.D3,2.D2,3.5D2,1.5D2,2.25D2,4.25D2/
      DATA N/ 8/ , NH/0 / , NG/22/
      DATA DEL0/1.00D0/ ,TAU0/1.D1/ ,TAU/.1D0/
      DATA (GUNIT(1,J),J=0,6)/7*-1/,((GUNIT(I,J),I=2,3),J=0,6)/14*0/,
     F     (GUNIT(1,J),J=7,22)/16*1/,(GUNIT(2,J),J=7,22)/1,2,3,4,5,6,7,
     F     8,1,2,3,4,5,6,7,8/,(GUNIT(3,J),J=7,22)/8*1,8*-1/
      END

